package com.fhz.day19.broadcast;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

import com.fhz.day19.utils.MusicUtils;

public class CallReceiver extends BroadcastReceiver {

    @Override
    public void onReceive(Context context, Intent intent) {
//
        String action = intent.getAction();
        if(action.equals(Intent.ACTION_NEW_OUTGOING_CALL)){
            //
            MusicUtils.getInstance().pause();
        }

    }
}